package com.lws.omapicompat.simalliance

import com.lws.omapicompat.ReaderCompat
import com.lws.omapicompat.SEServiceCompat
import com.lws.omapicompat.SessionCompat
import org.simalliance.openmobileapi.Reader

class ReaderOld(private val seServiceOld: SEServiceOld, private val reader: Reader) :
    ReaderCompat {

    override fun closeSessions() {
        reader.closeSessions()
    }

    override fun getName(): String {
        return reader.name
    }

    override fun getSEService(): SEServiceCompat {
        return seServiceOld
    }

    override fun isSecureElementPresent(): Boolean {
        return reader.isSecureElementPresent
    }

    override fun openSession(): SessionCompat {
        val session = reader.openSession()
        return SessionOld(this, session)
    }
}